﻿@using KRM.Core
@using KRM.Core.Library
@model tblCompanyVariable
<form class="margin0" action="/Utilities/SaveCompany" method="post" id="company">
    <fieldset>
        <legend></legend>
        <div class="row-fluid">
            <div class="span1">Name</div>
            <div class="span7">
                <input type="hidden" name="CompanyVariableID" value="@Model.CompanyVariableID" />
                <input type="text" name="Setting" value="@Model.Setting" class="input-block-level" required="required" />
            </div>
            <div class="span1" style="text-align: right">Type</div>
            <div class="span3">@Html.DropDownList("Type", null, "Select", new { @class = "input-block-level", @required = "required" }) </div>
        </div>
        <div class="row-fluid">
            <div class="span1">Value</div>
            <div class=" span11">
                <textarea name="Value" class="input-block-level">@Model.Value</textarea>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span1">Description</div>
            <div class=" span11">
                <input type="text" class="input-block-level" name="Description" value="@Model.Description"/>
            </div>
        </div>
        <div class="text-right">
            <input type="button" value="New" class="btn btn-success w100" onclick="CompanyVariablesDetail()" />
            <input type="submit" value="Save" class="btn btn-primary w100" style="margin: 0 5px" />
            <input type="button" value="Delete"onclick="@(Model.CompanyVariableID > 0 ? "DeleteCompany(" + @Model.CompanyVariableID + ");" : "alert('Please select variable!')")"   class="btn btn-danger w100" />
        </div>
    </fieldset>
</form>
